package com.example.job.domain.message.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class MessageCacheVO {

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(description = "消息 id")
    private Long messageId;

    @TableId(value = "TEXT_ID", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(description = "消息内容 id")
    private Long textId;

    @Schema(description = "发布人id")
    private Long sendId;

    @Schema(description = "查看状态（0 未查看 1已查看）")
    private Integer status;

    @Schema(description = "消息接收时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime receiveTime;
}
